How To Handle Exception In A Stored Procedure In PostgreSQL